package com.yao.shop.service;

import com.yao.shop.common.Page;
import com.yao.shop.pojo.Dto.ShopProductDto;
import com.yao.shop.pojo.Dto.ShopProductSearchDto;
import com.yao.shop.pojo.ShopProduct;
import com.yao.shop.pojo.ShopProductEs;
import com.yao.shop.pojo.vo.ShopProductVo;
import org.springframework.stereotype.Service;

import java.util.List;


public interface ShopProductService {
    /**
     * 添加商品
     * @param shopProductDto
     */
    void save(ShopProductDto shopProductDto);

    Page<ShopProductVo> getByPage(Page<ShopProductVo> page);

    ShopProductVo getUpdate(Long id);
    /**
     * 修改
     * @param shopProductDto
     */
    void update(ShopProductDto shopProductDto);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 上架
     * @param id
     */
    void publish(Long id);

    /**
     * 下架
     * @param id
     */
    void unPublish(Long id);

    /**
     * 新品
     * @param id
     */
    void news(Long id);

    /**
     * 取消新品
     * @param id
     */
    void old(Long id);

    /**
     * 推荐
     * @param id
     */
    void recommend(Long id);

    /**
     * 取消推荐
     * @param id
     */
    void unRecommend(Long id);

    List<ShopProduct> getProductDetailList(Long packCode);

    Page<ShopProductVo> getByPageHasNotPack(Page<ShopProductVo> page);

    List<ShopProduct> getNewProduct();

    List<ShopProduct> getRecommendList();

    ShopProductVo get(Long id);

    List<ShopProduct> getRankByProduct(Long productId);

    List<ShopProduct> getByIds(List<Long> ids);

    Page<ShopProductEs> search(ShopProductSearchDto shopProductDto);
}
